package cn.cau.epidemicsurveysystem.bean;

import javax.persistence.*;
import java.util.Objects;

/**
 * @projectName: gp2022
 * @package: cn.cau.epidemicsurveysystem.bean
 * @className: AreaBean
 * @author: zfy
 * @description: TODO
 * @date: 2022/3/5 0005 20:29
 * @version: 1.0
 */
@Entity
@Table(name = "area", schema = "gp2022", catalog = "")
public class AreaBean {
    private int areaId;
    private String areaName;

    @Id
    @Column(name = "areaId")
    public int getAreaId() {
        return areaId;
    }

    public void setAreaId(int areaId) {
        this.areaId = areaId;
    }

    @Basic
    @Column(name = "areaName")
    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AreaBean areaBean = (AreaBean) o;
        return areaId == areaBean.areaId &&
                Objects.equals(areaName, areaBean.areaName);
    }

    @Override
    public int hashCode() {

        return Objects.hash(areaId, areaName);
    }
}
